package com.fanix5.javamvvm.api;

import com.fanix5.javamvvm.app.Constant;
import com.fanix5.javamvvm.network.BaseRetrofit;


public class RetrofitUtil extends BaseRetrofit {
    private static  ApiService httpService;

    /**
     * @return retrofit的底层利用反射的方式, 获取所有的api接口的类
     */
    public static ApiService getHttpService() {
        if (httpService == null) {
            httpService = getRetrofit(Constant.BASE_URL).create(ApiService.class);
        }
        return httpService;
    }
}
